/*
Code from javascript countdown timer example at: 
http://nithinbekal.com/2009/12/06/javascript-how-to-create-a-simple-countdown-timer/
*/

function updateWCTime() {
	now      = new Date();
	kickoff  = new Date.parse("June 28, 2012 00:30:00");
	diff = kickoff - now;
	
	days  = Math.floor( diff / (1000*60*60*24) );
	hours = Math.floor( diff / (1000*60*60) );
	mins  = Math.floor( diff / (1000*60) );
	secs  = Math.floor( diff / 1000 );
	
	dd = days;
	hh = hours - days  * 24;
	mm = mins  - hours * 60;
	ss = secs  - mins  * 60;

	// document.getElementById("worldcup_countdown_time").innerHTML = dd + ' days<br/>' + hh + ' hours<br/>' + mm + ' minutes<br/>' + ss + ' seconds' ;
	document.getElementById("worldcup_countdown_time")
        .innerHTML =
            dd + ' days ' +
            hh + ' hours ' +
            mm + ' minutes ' +
            ss + ' seconds' ;

}
setInterval('updateWCTime()', 1000 );